This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Oct 7, 2011, 1:01 PM
47 Posts

XPage Not Respecting ACL Roles

  • Category: Debugging
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 4
 
In my application the ACL is set up with Person Groups and each group has it's own specific role assigned to it.  On the server (Windows running 8.5.2 FP1) that the application is deployed I noticed that logged in users aren't assigned the roles from the groups to which they belong. 
 
context.getUser().getRoles() is an empty list.   Here are some other things that I've noticed:
 
(1) context.getUser().getGroups() lists the correct user groups
(2) context.getUser().getRoles() works if the user is explicitly in the ACL
(3) On a basic Domino Form, @UserRoles returns the correct roles for the user (in the group)
(4) Three additional servers, one that is Windows running 8.5.3 CD5, and two others (one Windows, one Linux) running 8.5.2 show the user roles correctly on the Xpage
 
This leads me to believe that either the application is corrupt (happens on several of the xpages in the application) or that there is a setting somewhere on the server itself that does not expand the groups properly.  Any thoughts would gladly be appreciated.
 

Mike
 
Oct 7, 2011, 1:11 PM
24 Posts
Re: XPage Not Respecting ACL Roles
Hi Mike, you mean on the other 3 servers the same application works normally? What about the directory config on these server?
Oct 7, 2011, 1:29 PM
47 Posts
Re: XPage Not Respecting ACL Roles
Since the user gets assigned the proper group and can login I'm assuming that directory configuration is OK.  I just tried compacting the database and clearing out the browser and it seems as if it's working.
 
I am going to run some more tests.  Do you know how to use the ORGUNIT in the ACL entries on an Xpage? 
Oct 7, 2011, 1:36 PM
47 Posts
Re: XPage Not Respecting ACL Roles
So it's definitely weird behavior.  It now seems like the roles are being calculated.  I had 2 other people testing with me last night and I was printing the signed in Users' info to the log:
 
print( context.getUser() )
 
So I could see the roles was set to []... so I'm not crazy!  
 
Right now though I am getting correct values.  Could it be that compacting forced a recompilation?
Oct 17, 2011, 1:28 AM
24 Posts
Re: XPage Not Respecting ACL Roles
I don't think compact will cause recompilation. Should it, it's not supposed to fix your weird problem.
As to the org unit, if my understanding is correct, you could calculate the value for an user and do something based it. Theoretically, it can be indirectly calculated via DirectoryUser.getFullName(), using @Name formula, or writing a js function taking advantage of NotesName.OrgUnit1.
 
As I've met strange problems while using DirectoryUser.getXXXName(), I really doubt the credibility of this part of API.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal